8722dcfa006ea6eb3f142345040886e9d16fb784,applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java,ProductPromoWorker,performAction,#GenericValue#ShoppingCart#GenericDelegator#LocalDispatcher#Timestamp#,1075
Before Change
double discount = productPromoAction.get("amount") == null ? 0.0 : productPromoAction.getDouble("amount").doubleValue();
// don't allow the discount to be greater than the price
if (discount > cartItem.getBasePrice()) {
discount = cartItem.getBasePrice();
}
double discountAmount = -(quantityUsed * discount);
discountAmountTotal += discountAmount;
After Change
double discount = productPromoAction.get("amount") == null ? 0.0 : productPromoAction.getDouble("amount").doubleValue();
// don't allow the discount to be greater than the price
if (discount > cartItem.getBasePrice() * cartItem.getRentalAdjustment()) {
discount = cartItem.getBasePrice() * cartItem.getRentalAdjustment();
}
double discountAmount = -(quantityUsed * discount);
discountAmountTotal += discountAmount;